<template>
  <div class="submenu-container">
    <template v-for="menu in menuData">
      <el-submenu v-if="menu.children" :key="menu.index" :index="menu.path">
        <template slot="title">
          <i :class="menu.meta.icon"></i>
          <span slot="title">{{ menu.meta.title }}</span>
        </template>
        <menu-tree :menuData="menu.children"></menu-tree>
      </el-submenu>
      <el-menu-item v-else :key="menu.index" :index="menu.path" :disabled="menu.meta.disabled">
        <i :class="menu.meta.icon"></i>
        <span slot="title">{{ menu.meta.title }}</span>
      </el-menu-item>
    </template>
  </div>
</template>

<script>
export default {
  props: ['menuData'],
  name: "menu-tree",
  methods: {}
}
</script>

<style scoped>

</style>
